<?php
//我的账单
namespace App\Http\Controllers\Admin\Mobile;

use Illuminate\Http\Request;
use App\Http\Controllers\AdapterWebController;
use App\Modules\Mobile\Bill;

class BillController extends AdapterWebController
{
    //账单首页
    public function index(Request $request)
    {
        $data = $request->except('_token');
        $data['agent_id'] = session('agent_id');
        $list = $this->appLayerExec(Bill::class, 'billList', $data);
        return view('admin.agent.mobile.check', ['list' => $list['res']['list'], 'selected' => $list['res']['selected']]);
    }

    //账单详情
    public function detail(Request $request, $data)
    {
        $rqData = ['data' => $data, 'agent_id' => session('agent_id')];
        $detail = $this->appLayerExec(Bill::class, 'billDetail', $rqData);
        return view('admin.agent.mobile.check_detail', ['data' => $detail['res']]);
    }

}
